<template>
  <view class="course-container">
    <view class="course-header">课程名称</view>
    <view class="course-image"></view>
    <view class="teacher-info">
      <view class="teacher-avatar"></view>
      <view class="teacher-details">
        <view class="teacher-name">X老师</view>
        <view class="teacher-age">年龄：xx</view>
        <view class="teacher-experience">资历详情：xxxxxxxxxx</view>
      </view>
    </view>
    <view class="course-desc">课程描述：xxxxxxxxxx</view>
    <view class="course-time">报名时间：xxx-xxx 开课时间：xxx 结课时间：xxx</view>
    <view class="course-comment">
      <view class="comment-icon"></view>
      <view class="comment-text">评论xxx</view>
    </view>
    <view class="price-and-buttons">
      <view class="price">价格</view>
      <view class="buttons">
        <button class="consult-button">咨询老师</button>
        <button class="order-button">立即下单</button>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      // 动态数据
    };
  },
  methods: {
    consultTeacher() {
      console.log('咨询老师');
    },
    placeOrder() {
      console.log('立即下单');
    }
  }
};
</script>

<style scoped>
/* 全局设置，让页面充满屏幕 */
page {
  height: 100vh;
  width: 100vw;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.course-container {
  height: 100%;
  width: 100%;
  background-color: #ffc107; /* 黄色背景 */
  display: flex;
  flex-direction: column;
}

.course-header {
  background-color: #ff9800; /* 橙色标题栏 */
  padding: 10px;
  text-align: center;
}

.course-image {
  height: 200px; /* 图片区域高度 */
  background-color: white; /* 白色图片区域 */
  margin: 10px;
}

.teacher-info {
  display: flex;
  align-items: center;
  margin: 10px;
}

.teacher-avatar {
  width: 50px;
  height: 50px;
  background-color: #ccc; /* 灰色头像区域 */
  border-radius: 50%;
  margin-right: 10px;
}

.teacher-details {
  flex: 1;
}

.course-desc,
.course-time {
  margin: 10px;
}

.course-comment {
  display: flex;
  align-items: center;
  margin: 10px;
}

.comment-icon {
  width: 20px;
  height: 20px;
  background-color: green; /* 绿色评论图标 */
  border-radius: 50%;
  margin-right: 5px;
}

.price-and-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #ff5722; /* 红色底部栏 */
  padding: 10px;
}

.price {
  color: white;
}

.buttons {
  display: flex;
}

.consult-button,
.order-button {
  background-color: #ffc107; /* 黄色按钮 */
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  margin-left: 5px;
}
</style>